import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
 
public class _08_SumNumbersFromATextFile {
 
    public static void main(String[] args) throws IOException {

        try {

        	BufferedReader inputBufferStream = new BufferedReader(new FileReader("Input numbers.txt"));
            
            int textFileLinesSum = 0;
            String textFileLine = null;
            
            while ((textFileLine = inputBufferStream.readLine()) != null) {
                
            	textFileLinesSum += Integer.parseInt(textFileLine);
            }

            inputBufferStream.close();
            
            System.out.println(textFileLinesSum);
        }
        catch (java.io.FileNotFoundException e) {

            System.out.println("Error: " + e.getMessage());
        }
	}
}